import request from '@/utils/request'

// 专题推荐列表
export const fetchSubjectListHome = (params) => {
    return request({
        url: '/home/recommendSubject/list',
        method: 'get',
        params: params
    })
}

// 更新专题推荐状态
export const updateSubjectStatus = (data) => {
    return request({
        url: '/home/recommendSubject/update/recommendStatus',
        method: 'post',
        data: data
    })
}

// 删除专题
export const deleteSubject = (data) => {
    return request({
        url: '/home/recommendSubject/delete',
        method: 'post',
        data: data
    })
}

// 创建专题
export const createSubject = (data) => {
    return request({
        url: '/home/recommendSubject/create',
        method: 'post',
        data: data
    })
}

// 更新专题排序
export const updateSubjectSort = (params) => {
    return request({
        url: '/home/recommendSubject/update/sort/' + params.id,
        method: 'post',
        params: params
    })
}